import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

//配置路由
const router = new VueRouter({
	routes: [
		//路由重定向
		{
			path: "/",
			redirect: "/home", //路由重定向
		},
		//home 首页
		{
			path: "/home",
			name: "Home",
			component: () => import("../pages/home"),
			meta: {
				title: "",
				showFooter: true,
				showHeader: true,
				center1: true,
				center2: false,
				arrowLeft: false, //返回按钮
				showPopup: true,
			},
			
		},

				// 播放
				{
					path: "/songdetail/:id",
					name: "Songdetail",
					component: () => import("../pages/home/songdetail"),
					meta: {
						title: "",
						showFooter: true,
						showHeader: true,
						center1: true,
						center2: false,
						arrowLeft: false, //返回按钮
						showPopup: true,
					},
				},
		

		//侧边栏 设置
		{
			path: "/set",
			name: "Set",
			component: () => import("../pages/set"),
			meta: {
				title: "",
				showFooter: true,
				showHeader: false,
				center1: true,
				center2: false,
				arrowLeft: false, //返回按钮
				showPopup: true,
			},
		},
		//侧边栏 我的订单
		{
			path: "/order",
			name: "Order",
			component: () => import("../pages/order"),
			meta: {
				title: "",
				showFooter: true,
				showHeader: false,
				center1: true,
				center2: false,
				arrowLeft: false, //返回按钮
				showPopup: true,
			},
		},
		//侧边栏 我的消息
		{
			path: "/news",
			name: "News",
			component: () => import("../pages/news"),
			meta: {
				title: "",
				showFooter: true,
				showHeader: false,
				center1: true,
				center2: false,
				arrowLeft: false, //返回按钮
				showPopup: true,
			},
		},
		//侧边栏 云贝中心
		{
			path: "/conch",
			name: "Conch",
			component: () => import("../pages/conch"),
			meta: {
				title: "",
				showFooter: true,
				showHeader: false,
				center1: true,
				center2: false,
				arrowLeft: false, //返回按钮
				showPopup: true,
			},
		},

		{
			path: "/blog",
			name: "Blog",
			component: () => import("../pages/blog"),
			meta: {
				title: "",
				showFooter: true,
				showHeader: true,
				center1: true,
				center2: false,
				arrowLeft: false, //返回按钮
				showPopup: true,
			},
			children: [
				{
					//听听
					path: "listen",
					name: "Listen",
					component: () => import("@/pages/blog/listen"),
					meta: {
						showFooter: true,
					},
				},
				{
					// 推荐
					path: "recommend",
					name: "Recommend",
					component: () => import("@/pages/blog/recommend"),
					meta: {
						showFooter: true,
					},
				},
				{
					//分类
					path: "classify",
					name: "Classify",
					component: () => import("@/pages/blog/classify"),
					meta: {
						showFooter: true,
						showHeader: false,
						showPlay: true,
						center2: true,
					},
				},
			],
		},
		// 分类详情
		{
			path: "/classifydetail/:id",
			component: () => import("@/pages/blog/classify/classifydetail"),
			meta: {
				showFooter: true,
				showHeader: false,
				showPlay: true,
				center2: true,
			},
		},
		// mine 我的
		{
			path: "/mine",
			name: "Mine",
			component: () => import("../pages/mine"),
			meta: {
				title: "",
				showFooter: true,
				showHeader: true,
				center1: true,
				center2: false,
				arrowLeft: false, //返回按钮
				showPopup: true,
			},
			children: [
				{
					// 信息列表
					path: "creatlist/:id",
					name: "Creatlist",
					component: () => import("@/pages/mine/musiclist/creatlist.vue"),
					meta: {
						title: "",
						showFooter: true,
						showHeader: true,
						center1: false,
						center2: true,
						showPlay: true,
						showPopup: true,
					},
				},
				{
					// 歌单跳转详情
					path: "listdetail/:id",
					name: "Listdetail",
					component: () => import("@/pages/mine/musiclist/listdetail.vue"),
					meta: {
						title: "",
						showFooter: true,
						showHeader: true,
						center1: false,
						center2: true,
						showPlay: true,
						showPopup: true,
					},
				},
				{
					// 歌单助手
					path: "listhelper/:id",
					name: "Listhelper",
					component: () => import("@/pages/mine/musiclist/listhelper.vue"),
					meta: {
						title: "",
						showFooter: true,
						showHeader: true,
						center1: false,
						center2: true,
						showPlay: true,
						showPopup: true,
					},
				},
				{
					// 收藏歌单
					path: "liststar/:id",
					name: "Liststar",
					component: () => import("@/pages/mine/musiclist/liststar.vue"),
					meta: {
						title: "",
						showFooter: true,
						showHeader: true,
						center1: false,
						center2: true,
						showPlay: true,
						showPopup: true,
					},
				},
				{
					//我喜欢

					path: "mylove/:id",
					name: "Mylove",
					component: () => import("@/pages/mine/musiclist/mylove.vue"),
					meta: {
						title: "",
						showFooter: true,
						showHeader: true,
						center1: false,
						center2: true,
						showPlay: true,
						showPopup: true,
					},
				},
			],
		},
		//热门详情
		{
			path: "/datail/:actid",
			name: "Datail",
			component: () => import("@/pages/datail"),
			meta: {
				title: "",
				showFooter: true,
				showHeader: true,
				center1: true,
				center2: false,
				arrowLeft: false, //返回按钮
				showPopup: true,
			},
		},
		// follow 关注

		{
			path: "/follow",
			name: "Follow",
			component: () => import("@/pages/follow"),
			meta: {
				title: "",
				showFooter: true,
				showHeader: true,
				center1: true,
				center2: false,
				arrowLeft: false, //返回按钮
				showPopup: true,
			},
			children: [
				{
					//动态
					path: "dynamic",
					name: "Dynamic",
					component: () => import("../pages/follow/dynamic"),
					meta: {
						title: "",
						showFooter: true,
						showHeader: true,
						center1: false,
						center2: true,
						showPlay: false,
						showPopup: true,
					},
					children: [
						{
							// 全部
							path: "all",
							name: "All",
							component: () => import("@/pages/follow/all"),
							meta: {
								title: "",
								showFooter: true,
								showHeader: true,
								center1: false,
								center2: true,
								showPlay: false,
								showPopup: true,
							},
						},
						{
							// 音乐人
							path: "musician",
							name: "Musician",
							component: () => import("@/pages/follow/musician"),
							meta: {
								title: "",
								showFooter: true,
								showHeader: true,
								center1: false,
								center2: true,
								showPlay: false,
								showPopup: true,
							},
						},
						{
							// 朋友
							path: "friend",
							name: "Friend",
							component: () => import("@/pages/follow/friend"),
							meta: {
								title: "",
								showFooter: true,
								showHeader: true,
								center1: false,
								center2: true,
								showPlay: false,
								showPopup: true,
							},
						},
					],
				},
				{
					// 云圈
					path: "cloud",
					name: "Cloud",
					component: () => import("@/pages/follow/cloud"),
					meta: {
						title: "",
						showFooter: true,
						showHeader: true,
						center1: false,
						center2: true,
						showPlay: false,
						showPopup: true,
					},
				},
			],
		},
		{
			path: "/login",
			name: "Login",
			component: () => import("../pages/login"),
			meta: {
				title: "",
				showFooter: true,
				showHeader: true,
				center1: true,
				center2: false,
				arrowLeft: false, //返回按钮
				showPopup: true,
			},
		},
		//侧边栏 退出登录子
		{
			path: "/install",
			name: "Lnstall",
			component: () => import("../pages/install"),
			meta: {
				title: "",
				showFooter: true,
				showHeader: true,
				center1: true,
				center2: false,
				arrowLeft: false, //返回按钮
				showPopup: true,
			},
		},
		//创建歌单
		{
			path: "/creatlist/:id",
			name: "creatlist",
			component: () => import("../pages/mine/musiclist/creatlist.vue"),
			meta: {
				title: "创建歌单",
				showFooter: true,
				showHeader: true,
				center1: false,
				arrowLeft: true,
			},
		},
		//收藏歌单
		{
			path: "/liststar/:id",
			name: "liststar",
			component: () => import("../pages/mine/musiclist/liststar.vue"),
			meta: {
				title: "收藏歌单",
				showFooter: false,
				showHeader: true,
				center1: false,
				arrowLeft: true,
			},
		},
		//歌单助手
		{
			path: "/listhelper/:id",
			name: "listhelper",
			component: () => import("../pages/mine/musiclist/listhelper.vue"),
			meta: {
				title: "歌单助手",
				showFooter: false,
				showHeader: true,
				center1: false,
				arrowLeft: true,
			},
		},
		{
			path: "/daily",
			name: "daily",
			component: () => import("../pages/home/homelist/daily.vue"),
			meta: {
				title: "每日推荐",
				showFooter: false,
				showHeader: true,
				center1: false,
				arrowLeft: true,
			},
		},
		{
			path: "/fm",
			name: "fm",
			component: () => import("../pages/home/homelist/fm.vue"),
			meta: {
				title: "私人FM",
				showFooter: false,
				showHeader: true,
				center1: false,
				arrowLeft: true,
			},
		},
		{
			path: "/songsheet",
			name: "songsheet",
			component: () => import("../pages/home/homelist/songsheet.vue"),
			meta: {
				title: "歌单",
				showFooter: false,
				showHeader: true,
				center1: false,
				arrowLeft: true,
			},
		},
		{
			path: "/rank",
			name: "rank",
			component: () => import("../pages/home/homelist/rank.vue"),
			meta: {
				title: "排行榜",
				showFooter: false,
				showHeader: true,
				center1: false,
				arrowLeft: true,
			},
		},
	],
	linkActiveClass: "active", //自己设置class名
});

export default router;
